﻿using System;
using System.Data;

namespace YArchitech.HVAC
{
	public class Timbering
	{
		public static string GetDrXs(string strName)
		{
			string result;
			try
			{
				DataTable dataTable = DataAccess.GetDataSet("select DrXs from Timbering where Name like '%" + strName + "%'", "Timbering").Tables["Timbering"];
				if (dataTable.Rows.Count > 0)
				{
					result = dataTable.Rows[0][0].ToString();
				}
				else
				{
					result = "1.00";
				}
			}
			catch (Exception ex)
			{
				ex.ToString();
				result = "1.00";
			}
			return result;
		}

		public static string GetDrXs()
		{
			string result;
			try
			{
				result = "1.00";
			}
			catch (Exception ex)
			{
				ex.ToString();
				result = "1.00";
			}
			return result;
		}

		public static int GetCount()
		{
			return DataAccess.GetDataSet("select * from Timbering", "Timbering").Tables[0].Rows.Count;
		}
	}
}
